﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RoomBooking.aspx.cs" Inherits="SWEN_HMS.BookingModule.RoomBooking" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">


        .auto-style2
        {
            width: 100%;
        }
        .auto-style16
        {
            color: #000000;
        }
        .auto-style23
        {
            width: 144px;
            color: #000000;
        }
        .auto-style24
        {
            width: 144px;
            height: 26px;
            color: #000000;
        }
        .auto-style5
        {
            height: 26px;
        }
        .auto-style25
        {
            width: 143px;
            color: #000000;
        }
        .auto-style21
        {
            width: 216px;
        }
        .auto-style22
        {
            text-align: left;
        }
        .auto-style6
        {
            width: 143px;
            height: 21px;
            color: #000000;
        }
        .auto-style7
        {
            height: 21px;
        }
        .auto-style12
        {
            width: 143px;
            height: 31px;
            color: #000000;
        }
        .auto-style13
        {
            height: 31px;
        }
        .auto-style18
        {
            width: 143px;
            height: 26px;
            color: #000000;
        }
        .auto-style8
        {
            width: 143px;
            height: 132px;
            color: #000000;
        }
        .auto-style9
        {
            height: 132px;
        }
        .auto-style3
        {
            width: 143px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content5" runat="server" contentplaceholderid="pageTitlePHolder">
    <span class="auto-style1" style="color: #000000">Room Booking Page<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    </span>
&nbsp;
</asp:Content>
<asp:Content ID="Content6" runat="server" contentplaceholderid="ContentPlaceHolder1">
        <asp:Panel ID="Panel1" runat="server" CssClass="newStyle1">
            <br />
            <table class="auto-style2">
                <tr>
                    <td class="auto-style16" colspan="2">
                        <h2 class="auto-style20">guest information</h2>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">First Name: </td>
                    <td>
                        <asp:TextBox ID="TextBox1" runat="server" Width="172px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="firstNameVali" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="Please enter guest first name" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="firstnameVali2" runat="server" ControlToValidate="TextBox1" Display="Dynamic" ErrorMessage="This column must only contain letters" Font-Size="10pt" ForeColor="Red" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style24">Last Name: </td>
                    <td class="auto-style5">
                        <asp:TextBox ID="TextBox2" runat="server" Width="172px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="lastnameVali" runat="server" ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="Please enter guest last name" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="lastnameVali2" runat="server" ControlToValidate="TextBox2" Display="Dynamic" ErrorMessage="This column must only contain letters" Font-Size="10pt" ForeColor="Red" ValidationExpression="^[a-zA-Z''-'\s]{1,40}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style24">Contact Number: </td>
                    <td class="auto-style5">
                        <asp:TextBox ID="TextBox3" runat="server" Height="17px" TextMode="Phone" Width="120px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox3_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="TextBox3">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ID="contactnoVali2" runat="server" ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="Please enter contact" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="contactnoVali3" runat="server" ControlToValidate="TextBox3" ErrorMessage="Invalid number" Font-Size="10pt" ForeColor="Red" ValidationExpression="^(6|8|9)\d{7}$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">Email: </td>
                    <td>
                        <asp:TextBox ID="TextBox4" runat="server" Width="269px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="emailVali" runat="server" ControlToValidate="TextBox4" Display="Dynamic" ErrorMessage="Please enter the email address" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="emailVali2" runat="server" ControlToValidate="TextBox4" Display="Dynamic" ErrorMessage="Incorrect email format" Font-Size="10pt" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">Address: </td>
                    <td>
                        <asp:TextBox ID="TextBox5" runat="server" Width="461px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="addressVali" runat="server" ControlToValidate="TextBox5" Display="Dynamic" ErrorMessage="Please enter address" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">&nbsp;</td>
                    <td>&nbsp;</td>
                </tr>
                <tr>
                    <td class="auto-style16" colspan="2">
                        <h2 class="auto-style20">Room information</h2>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">Type of Room:</td>
                    <td>
                        <asp:DropDownList ID="roomType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="roomType_SelectedIndexChanged" Width="200px">
                            <asp:ListItem>Please Select Room Type</asp:ListItem>
                            <asp:ListItem>Classic Suite</asp:ListItem>
                            <asp:ListItem>Deluxe Room</asp:ListItem>
                            <asp:ListItem>Executive Suite</asp:ListItem>
                            <asp:ListItem>Grand Executive Suite</asp:ListItem>
                            <asp:ListItem>Superior Room</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="roomVali" runat="server" ControlToValidate="roomType" Display="Dynamic" ErrorMessage="Please select room type" Font-Size="10pt" ForeColor="Red" InitialValue="Please Select Room Type"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style24">Available Rooms:</td>
                    <td class="auto-style5">
                        <asp:DropDownList ID="roomNoSelection" runat="server" Width="60px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23">Number of Adult:</td>
                    <td>
                        <asp:TextBox ID="TextBox10" runat="server" Width="50px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox10_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="TextBox10">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ID="adultVali" runat="server" ControlToValidate="TextBox10" Display="Dynamic" ErrorMessage="Please enter no. of adult" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style23"><span class="auto-style16">Number of Child:</span></td>
                    <td>
                        <asp:TextBox ID="TextBox11" runat="server" Width="50px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="TextBox11_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="TextBox11">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ID="childVali" runat="server" ControlToValidate="TextBox11" Display="Dynamic" ErrorMessage="Please enter no. of child" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <table class="auto-style2">
                <tr>
                    <td class="auto-style25">Check In Date:<br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                    </td>
                    <td class="auto-style21">
                        <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" OnDayRender="Calendar1_DayRender" OnSelectionChanged="Calendar1_SelectionChanged" Width="200px">
                            <DayHeaderStyle BackColor="#FFFF99" Font-Bold="True" Font-Size="7pt" />
                            <NextPrevStyle VerticalAlign="Bottom" />
                            <OtherMonthDayStyle ForeColor="#808080" />
                            <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
                            <SelectorStyle BackColor="#CCCCCC" />
                            <TitleStyle BackColor="#FFCC66" BorderColor="Black" Font-Bold="True" />
                            <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
                            <WeekendDayStyle BackColor="#FFFFCC" />
                        </asp:Calendar>
                        <asp:TextBox ID="checkInDate" runat="server" ReadOnly="True"></asp:TextBox>
                        <br />
                        <asp:RequiredFieldValidator ID="checkInDateVali" runat="server" ControlToValidate="checkInDate" ErrorMessage="Please select date" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                    <td class="auto-style22"><span class="auto-style16">Check Out Date:
                        <asp:Label ID="checkOutDate" runat="server" Text="Label" Visible="False"></asp:Label>
                        <br />
                        Duration of Stay:
                        <asp:TextBox ID="durationOfStay" runat="server" TextMode="Number" ValidationGroup="durationValit" Width="50px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="durationOfStay_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="durationOfStay">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        &nbsp;days<br />
                        <asp:RequiredFieldValidator ID="durationVali" runat="server" ControlToValidate="durationOfStay" ErrorMessage="Please enter duration" Font-Size="10pt" ForeColor="Red" ValidationGroup="durationValit"></asp:RequiredFieldValidator>
                        <br />
                        <br />
                        <asp:Button ID="countCOD" runat="server" OnClick="countCOD_Click" Text="Generate " ValidationGroup="durationValit" />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        </span></td>
                </tr>
                <tr>
                    <td class="auto-style25">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td class="auto-style16" colspan="3">
                        <h2 class="auto-style20">Payment information</h2>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style6">Payment Type:</td>
                    <td class="auto-style7" colspan="2">
                        <asp:DropDownList ID="paymentTypeDD" runat="server" AutoPostBack="True" OnSelectedIndexChanged="paymentTypeDD_SelectedIndexChanged" Width="200px">
                            <asp:ListItem>Please Select Payment Type</asp:ListItem>
                            <asp:ListItem>Cash</asp:ListItem>
                            <asp:ListItem>Credit Card</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="paymentTypeVali" runat="server" ControlToValidate="paymentTypeDD" ErrorMessage="Please select payment type" Font-Size="10pt" ForeColor="Red" InitialValue="Please Select Payment Type"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style12">Credit Card Type:</td>
                    <td class="auto-style13" colspan="2">
                        <asp:DropDownList ID="creditcard" runat="server" Enabled="False" Width="200px" OnSelectedIndexChanged="creditcard_SelectedIndexChanged">
                            <asp:ListItem>Please Select Card Type</asp:ListItem>
                            <asp:ListItem>Amex</asp:ListItem>
                            <asp:ListItem>Discover</asp:ListItem>
                            <asp:ListItem>Eurocard</asp:ListItem>
                            <asp:ListItem>Mastercard</asp:ListItem>
                            <asp:ListItem>Visa</asp:ListItem>
                        </asp:DropDownList>
                        <asp:Label ID="cct" runat="server" Font-Size="10pt" ForeColor="Red" Text="Label" Visible="False"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style25">Card Holder Name:<br /> (in capital)</td>
                    <td colspan="2">
                        <asp:TextBox ID="cardholdername" runat="server" Enabled="False"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="cardholdername_FilteredTextBoxExtender0" runat="server" TargetControlID="cardholdername" FilterType="UppercaseLetters">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <ajaxToolkit:FilteredTextBoxExtender ID="cardholdername_FilteredTextBoxExtender" runat="server" FilterType="UppercaseLetters,Custom" TargetControlID="cardholdername" ValidChars=" ">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ID="cardHolderVali" runat="server" ControlToValidate="cardholdername" ErrorMessage="Please fill in card holder's name!" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style25">Credit Card Number:</td>
                    <td colspan="2">
                        <asp:TextBox ID="cardholderno" runat="server" Enabled="False"></asp:TextBox>
                        <ajaxToolkit:MaskedEditExtender ID="cardholderno_MaskedEditExtender" runat="server" ErrorTooltipEnabled="true" Mask="9999$9999$9999$9999" MaskType="Number" MessageValidatorTip="true" TargetControlID="cardholderno">
                        </ajaxToolkit:MaskedEditExtender>
                        <asp:RequiredFieldValidator ID="ccNoVali" runat="server" ControlToValidate="cardholderno" ErrorMessage="Please fill in credit card number!" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style18">CVC:</td>
                    <td class="auto-style5" colspan="2">
                        <asp:TextBox ID="cvc" runat="server" Enabled="False" Width="50px"></asp:TextBox>
                        <ajaxToolkit:FilteredTextBoxExtender ID="cvc_FilteredTextBoxExtender" runat="server" FilterType="Numbers" TargetControlID="cvc">
                        </ajaxToolkit:FilteredTextBoxExtender>
                        <asp:RequiredFieldValidator ID="cvcVali" runat="server" ControlToValidate="cvc" ErrorMessage="Please fill in CVC!" Font-Size="10pt" ForeColor="Red"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style25">Expiry Date: </td>
                    <td colspan="2">
                        <asp:DropDownList ID="DMonth" runat="server" Enabled="False" Width="45px">
                        </asp:DropDownList>
                        <asp:DropDownList ID="DYear" runat="server" Enabled="False">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style25">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
                <tr>
                    <td class="auto-style16" colspan="3">
                        <h2 class="auto-style20"><strong>others</strong></h2>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style8">Additional Remarks:
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                    </td>
                    <td class="auto-style9" colspan="2">
                        <asp:TextBox ID="remarks" runat="server" Height="122px" TextMode="MultiLine" Width="407px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style25">Subscription</td>
                    <td colspan="2">
                        <asp:CheckBox ID="Subscription" runat="server"/>
                    </td>
                </tr>
                <tr>
                    <td class="auto-style3">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                </tr>
            </table>
            <br />
            <asp:Button ID="booking" runat="server" CssClass="btnCSS" OnClick="booking_Click" Text="Confirm Booking" />
            &nbsp;<asp:Button ID="cancel" runat="server" CssClass="btnCSS" Text="Cancel" CausesValidation="False" OnClick="cancel_Click" />
            <br />
            &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <br />
            <br />
            <br />
            <br />
            <br />
            <br />
            &nbsp;&nbsp;<br />
        </asp:Panel>
    </asp:Content>

